package io.chenglicun.modules.knowledge.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.chenglicun.common.service.impl.CrudServiceImpl;
import io.chenglicun.modules.knowledge.dao.KnowledgeQaDao;
import io.chenglicun.modules.knowledge.dto.KnowledgeQaDTO;
import io.chenglicun.modules.knowledge.entity.KnowledgeQaEntity;
import io.chenglicun.modules.knowledge.service.KnowledgeQaService;
import io.chenglicun.modules.security.user.SecurityUser;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 用户提问记录
 *
 * @author shicong 705740711@qq.com
 * @since 1.0 2024-05-10
 */
@Service
public class KnowledgeQaServiceImpl extends CrudServiceImpl<KnowledgeQaDao, KnowledgeQaEntity, KnowledgeQaDTO> implements KnowledgeQaService {

    @Override
    public QueryWrapper<KnowledgeQaEntity> getWrapper(Map<String, Object> params){
        QueryWrapper<KnowledgeQaEntity> wrapper = new QueryWrapper<>();
        wrapper.eq("creator", SecurityUser.getUserId());

        return wrapper;
    }


}